import java.util.Scanner;

public class 统计质数 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        boolean flag = true;


        for (int x = 2; x < n; x++) {

            if (flag) {
                System.out.println();
                count++;
            }
        }

        System.out.println("质数有" + count + "个");
    }
}